# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libisoburn
pkgver=1.5.2
pkgrel=0
pkgdesc="Library to enable creation and expansion of ISO-9660 filesystems"
url="https://dev.lovelyhq.com/libburnia/web/wikis/home"
arch="all"
license="GPL-2.0-or-later"
makedepends="libburn-dev libisofs-dev acl-dev zlib-dev
	libedit-dev"
subpackages="$pkgname-dev $pkgname-doc xorriso:_xorriso"
source="http://files.libburnia-project.org/releases/libisoburn-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/bin/xorriso-tcltk
	ln -s xorriso "$pkgdir"/usr/bin/mkisofs
}

_xorriso() {
	pkgdesc="ISO-9660 and Rock Ridge image manipulation tool"
	replaces="cdrkit"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="b481aa5ff20bb35ab0ab19f3f4f3ebc4f2baa8366a14a5afe4f262788441679b6501e140e182f4e80045c747f1cf48db40832d8d5cd064e58a02de2882536897  libisoburn-1.5.2.tar.gz"
